#if !defined(ximera_scripting_ivirtualmachine_hpp)
#define ximera_scripting_ivirtualmachine_hpp

// -----------------------------------------------------------

#include <ximera/config.hpp>
#include <ximera/common/sharedptr.hpp>
#include <ximera/exception.hpp>
#include <ximera/scripting/iscript.hpp>

namespace ximera { namespace scripting
{
    XIMERA_DECLARE_EXCEPTION(CompilerException, L"Script had syntax errors.");
    XIMERA_DECLARE_EXCEPTION(RuntimeException, L"Script had runtime errors.");

    class XIMERA_API IVirtualMachine
    {
    public:
        virtual ~IVirtualMachine() {}

        virtual Language language() const = 0;

        virtual void run(SharedPtr<IScript> const& script) = 0;
        virtual void run(IScript* script) = 0;
        virtual void run(String const& data) = 0;
    };
}}

// -----------------------------------------------------------

#endif